/**
 * 
 */
package org.spolo.android.shape;

import org.spolo.android.nodetree.Vcanvas;

import android.graphics.Canvas;

public class Circle extends Vcanvas {
	public static final int ON_CENTERCHANGE = 1;
	protected float x;
	protected float y;
	protected float radius;

	/**
	 * @param x
	 *            圆心X坐标
	 * @param y
	 *            圆心Y坐标
	 * @param radius
	 *            半径
	 */
	public Circle(float x, float y, float radius) {
		super();
		this.x = x;
		this.y = y;
		this.radius = radius;
		setDirtyRect((x - this.radius), (y - this.radius), radius * 2,
				radius * 2);
	}

	@Override
	public void drawSelfImplement(Canvas canvas) {
		canvas.drawCircle(this.getCenter()[0], this.getCenter()[1], radius,
				this.getPaint());

	}

}
